import React from 'react';

import BaseAction from '../common/BaseAction';
import Functions from '../../common/Functions';
import Constants from '../../common/Constants'
//检测是否是用户
export default class LoginCheckIsUserAction extends BaseAction {
  constructor(props) {
    super(props);
    this.moduleType = Constants.MODULE_TYPE.LOGIN;
    this.name = "LoginCheckIsUserAction";

    this.finishCall = () => {};
  }

  call(caller, data, callback) {
    this.finishCall = callback;
    this._baseCall(caller, data);
  }

  finish(content, result) {
    if(!result && this.data.showAlert != false) {
      Functions.loginInfoUserAlert(this.caller, content);
    }
    this.finishCall(result);
  }
}
